﻿using System;
using System.Linq;
using System.Linq.Expressions;

namespace LuckyLoot.Common.Repositories.Contracts
{
    public interface IRepository<TEntity> where TEntity : class
    {
        IQueryable<TEntity> GetAll();
        IQueryable<TEntity> GetByCriteria(Expression<Func<TEntity, bool>> criteria);
        TEntity GetById(int id);
        void Add(TEntity entity);
        void Delete(TEntity entity);
        void Edit(TEntity entity);
        void Save();
    }
}
